//
//  File.swift
//  SmartCheckIn
//
//  Created by Cidy Chou on 2017/9/5.
//  Copyright © 2017年 CidyChou. All rights reserved.
//

import Foundation

class UserDefaultUtils {

    //全局设置 简化 NSUserDefaults 的写法
    //MARK:-------- 全局 常量 设置
    let IsFirstLaunch = "IsFirstLaunch"
    let UserName = "UserName"
    let UserPwd = "UserPwd"
    
    //MARK:------------- LCDUserDefaults
    func LCDUserDefaultsSet(key:String, obj:AnyObject) -> Void {
        return UserDefaults.standard.set(obj, forKey: key)
    }
    func LCDUserDefaultsGet(key:String) -> AnyObject {
        return UserDefaults.standard.value(forKey: key)! as AnyObject
    }
    func LCDUserDefaultsRemo(key:String) -> Void {
        UserDefaults.standard.removeObject(forKey: key)
    }
    func LCDUserDefaultsBool(key:String) -> Bool {
        return UserDefaults.standard.bool(forKey: key)
    }
    func LCDUserDefaultsSyn() {
        UserDefaults.standard.synchronize()
    }
    
}
